package licode.unisop.realm.client.event;

import cn.hutool.json.JSONUtil;
import licode.unisop.provider.vo.SiUser;
import licode.unisop.types.event.DomainEvent;

public class UserUpdatedEvent extends DomainEvent {
    public UserUpdatedEvent(SiUser data) {
        super(UserUpdatedEvent.class.getTypeName(),
                JSONUtil.toJsonStr(data), "user:update");
    }

    public SiUser getUser() {
        return JSONUtil.toBean(getData(), SiUser.class);
    }
}
